#ifndef MSG_AA_H
#define MSG_AA_H
/*************************************************************************
 *
 * Module:	msg_aa.h 
 *
 * Purpose:	
 *		
 *
 * Dependencies:  
 *
 * Author:	
 *
 * Modification History (latest first):
 * Rv	Date	  By		Reason for change
 * ---  --------  -----------  	---------------------------------------------
 * 10   05/20/98  A.Malka       * Add QteInfo2, QteData2, QteDataLog2, and
 *                              * LostCompConn
 * 09   04/21/98  A.Malka       * Add QteNotTaker
 * 08   06/21/93  E.Howorka     * Delete a number of fields from QTEDELETED.
 * 07   06/14/93  E.Howorka     * Add prcDealable to QTEDELETED.
 * 06   06/11/93  E.Howorka     * Add QTEDELETED.
 * 05   04/21/93  E.Howorka     * Add tsPairsFile, tsNodesFile to 
 *				  STARTUPARBRQST
 * 05   02/01/93  E.Howorka     * Add tsQteSubmit to QTEINFO
 * 04   01/05/93  E.Howorka     * Delete msg structures: QTEAMTUNRESERVED, 
 *                                QTEDEALDONE, HITQTEDONE.
 *                              * New msg structures: LOGSESSIONEND, QTEAMTDONE.
 *                              * In QTEINFO, add fields: baQteAmtPend, 
 *                                baQteAmtDone, dateValue, fQteInterrupted.
 *                              * In CREDITDATA, add field fMsgFirst.
 *                              * In HITQTE, add field dateValue.
 *                              * In QTEAMTRESERVED, change field baDealAmt
 *                                to baAmtReserved
 *                              * In QTEAVAILABLE, deleted field prcQteDealt, 
 *                                added field dateValue.
 *                              * In QTEDATA msg struct, added field fMsgFirst.
 * 03   10/23/92  E.Howorka     rearrange and add fields to hitqte,hitqtedone,
 *				hitqteack,qteamtreserved,qteamtunreserved,
 *				qtedealdone. rearrange qteavailable 
 *				add qtedatalog
 * 02	10/15/92  E.Wrzesien	delete eventlogmsg
 * 01				Initial creation.
 *
 *************************************************************************/


#include "ebs_defn.h"
#include "nodes_g.h"


/******************************************************************************
                     Non-message definitions
******************************************************************************/

/*	Structure used to represent state of a quote at the 
*	owning Arbitrator.
*
*	NOTE: this structure has been superseded by QTEINFO2, but remains
*	      for compatibility with old log files that contain messages
*	      using this structure
*/
typedef struct _QTEINFO *PQTEINFO;                    		/* pqif */
typedef struct _QTEINFO                                    	/*  qif */
      {
           EBSTRANSID          etiQteId; 
           FXPRICE             prcQte;
           FXBASEAMT           baQteAmt;
           FXBASEAMT           baQteAmtAvail;
           FXBASEAMT           baQteAmtPend;
           FXBASEAMT           baQteAmtDone;
           FXFLRKEY            fkMaker;
           FXDATE	       dateValue;
           FXCHAR              achTraderIdMaker [DIM_TRADER_ID];
           BOOL		       fQteInterrupted;
           FXTIMESTAMP         tsQteSubmit;
      }QTEINFO;



/*	Structure used to represent state of a quote at the 
*	owning Arbitrator.
*/
typedef struct _QTEINFO2 *PQTEINFO2;                   		/* pqif */
typedef struct _QTEINFO2                                    	/*  qif */
      {
           EBSTRANSID          etiQteId; 
           FXPRICE             prcQte;
           FXBASEAMT           baQteAmt;
           FXBASEAMT           baQteAmtAvail;
           FXBASEAMT           baQteAmtPend;
           FXBASEAMT           baQteAmtDone;
           FXFLRKEY            fkMaker;
           FXDATE	       dateValue;
           FXCHAR              achTraderIdMaker [DIM_TRADER_ID];
           struct
           {
             FXBITFIELD	       bfQteInterrupted : 1;
             FXBITFIELD	       bfQteNotTaker    : 1;	/* TRUE=qte is too old
							   to be a taker */
             FXBITFIELD        bfCLSEligible    : 1;
             FXBITFIELD	       bfReserved       : 5;
           }                   flags;
           FXTIMESTAMP         tsQteSubmit;
      }QTEINFO2;

							/*Linked Amount++*/
/*	Structure used to represent state of a quote at the 
*	owning Arbitrator (Linked Amounts version).
*/
typedef struct _QTEINFO3 *PQTEINFO3;                   		/* pqif */
typedef struct _QTEINFO3                                    	/*  qif */
      {
           EBSTRANSID          etiQteId; 
           FXPRICE             prcQte;
           FXBASEAMT           baQteAmt;
	   FXBASEAMT	       baLinkedAmt;
           FXBASEAMT           baQteAmtAvail;
	   FXBASEAMT	       baLinkedAmtAvail;
           FXBASEAMT           baQteAmtPend;
           FXBASEAMT           baQteAmtDone;
           FXFLRKEY            fkMaker;
           FXDATE	       dateValue;
           FXCHAR              achTraderIdMaker [DIM_TRADER_ID];
           struct
           {
             FXBITFIELD	       bfQteInterrupted : 1;
             FXBITFIELD	       bfQteNotTaker    : 1;	/* TRUE=qte is too old
							   to be a taker */
             FXBITFIELD        bfCLSEligible    : 1;
             FXBITFIELD	       bfReserved       : 5;
           }                   flags;
           FXTIMESTAMP         tsQteSubmit;
      }QTEINFO3;
                                                		/*Linked Amount--*/



/*	Structure used to represent state of a quote at the 
*	owning Arbitrator.
*/
typedef struct _QTEINFO4 *PQTEINFO4;                   		/* pqif */
typedef struct _QTEINFO4                                    	/*  qif */
      {
           EBSTRANSID          etiQteId; 
           FXPRICE             prcQte;
           FXBASEAMT           baQteAmt;
	   FXBASEAMT	       baLinkedAmt;
           FXBASEAMT           baQteAmtAvail;
	   FXBASEAMT	       baLinkedAmtAvail;
           FXBASEAMT           baQteAmtPend;
           FXBASEAMT           baQteAmtDone;
           FXFLRKEY            fkMaker;
           FXDATE	       dateValue;
           FXCHAR              achTraderIdMaker [DIM_TRADER_ID];
           struct
           {
             FXBITFIELD	       bfQteInterrupted : 1;
             FXBITFIELD	       bfQteNotTaker    : 1;	/* TRUE=qte is too old
							   to be a taker */
             FXBITFIELD        bfCLSEligible    : 1;
             FXBITFIELD	       bfReserved       : 5;
           }                   flags;
           FXTIMESTAMP         tsQteSubmit;
           FXFLRKEY            fkOriginator;
           EBSPBID             epbiMakerPB;
      }QTEINFO4;




/*	Structure used to represent status of a floor (MAN) that is signed
*	on to its Arbitrator.
*/
typedef struct _MANINFO *PMANINFO;				/* pmif */
typedef struct _MANINFO						/*  mif */
      {
        FXFLRKEY        fk;
        IPINFO          ipi;
        FXCHAR          Reserved[8];
      }MANINFO;



/*	Structure used to represent status of a floor (MAN) that is signed
*	on to its Arbitrator.
*/
typedef struct _MANINFO2 *PMANINFO2;				/* pmif */
typedef struct _MANINFO2					/*  mif */
      {
        FXFLRKEY        fk;
        USHORT          usVersion;
        IPINFO          ipi;
        IPINFO          ipiSecondary;
        FXCHAR          Reserved[8];
      }MANINFO2;




/******************************************************************************
                     Message typedefs
******************************************************************************/

/*
   NAME :AA_ChkCreditData
   DESC :This message contains a reduced representation ("checksum") of the
          owning Arbitrator's part of the global yes/no credit martix.
          It is used to validate the corresponding data held by the
          remote Arbitrator.
*/
typedef struct _CHKCREDITDATA    *PCHKCREDITDATA;               /* pccd  */
typedef struct _CHKCREDITDATA                                   /*  ccd  */
        {
           MSGHDREBS           mhebs;
           FXLONG              lCreditChk;
        }CHKCREDITDATA;

/*
   NAME :AA_ChkFlrData
   DESC :This message contains a reduced representation ("checksum") of
         various data entities of the owning Arbitrator.
         It is used to validate the corresponding data held by the
         remote Arbitrator.
*/
typedef struct _CHKFLRDATA    *PCHKFLRDATA;                     /* pcfd  */
typedef struct _CHKFLRDATA                                      /*  cfd  */
        {
           MSGHDREBS           mhebs;
           FXLONG              lCreditChk;
           FXLONG              lMANInfoChk;
        }CHKFLRDATA;

/*
   NAME :AA_ChkCreditDataAck
   DESC :This message is sent in response to AA_ChkCreditData.
*/
typedef struct _CHKCREDITDATAACK  *PCHKCREDITDATAACK;           /* pccda  */
typedef struct _CHKCREDITDATAACK                                /*  ccda  */
        {
           MSGHDREBS           mhebs;
           FXBOOL              fChkOk;
        }CHKCREDITDATAACK;

/*
   NAME :AA_ChkFlrDataAck
   DESC :This message is sent in response to AA_ChkFlrData.
*/
typedef struct _CHKFLRDATAACK  *PCHKFLRDATAACK;                 /* pcfda  */
typedef struct _CHKFLRDATAACK                                   /*  cfda  */
        {
           MSGHDREBS           mhebs;
           FXBOOL              fCreditChkOk;
           FXBOOL              fMANInfoChkOk;
        }CHKFLRDATAACK;

/*
   NAME :AA_ChkQteData
   DESC :This message contains a reduced representation ("checksum") of the
         Arbitrator's set of all EBS quotes for the specified currency pair.
         It is used to validate the corresponding data held by the another
         Arbitrator.
*/
typedef struct _CHKQTEDATA  *PCHKQTEDATA;                       /* pcqd */
typedef struct _CHKQTEDATA                                      /*  cqd */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           FXLONG              lQteChk;
        }CHKQTEDATA;


/*
   NAME :AA_ChkQteDataAck
   DESC :This message is sent in response to AA_ChkQteData.
*/
typedef struct _CHKQTEDATAACK  *PCHKQTEDATAACK;                 /* pcqda */
typedef struct _CHKQTEDATAACK                                   /*  cqda */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           FXBOOL              fChkOk;
        }CHKQTEDATAACK;


/*
   NAME :AA_CreditData
   DESC :This message contains a full representation of the owning
         Arbitrator's part of the global yes/no credit martix.  It is used to
         (re)initialize the corresponding data held by the remote Arbitrator.
*/
typedef struct _CREDITDATA  *PCREDITDATA;                       /* pcd */
typedef struct _CREDITDATA                                      /*  cd */
        {
           MSGHDREBS           mhebs;
           FXFLRKEY            fk;
           FXBOOL              fMsgFirst;
           FXBOOL              fMsgMore;
           FXBYTE              bItemCnt;
           FXFLRKEY            afkCparty[DIM_MAX_FLR_KEYS];
        }CREDITDATA;


/*
   NAME :AA_CreditData2
   DESC :This message contains a full representation of the owning
         Arbitrator's part of the global yes/no credit martix.  It is used to
         (re)initialize the corresponding data held by the remote Arbitrator.
*/
typedef struct _CREDITDATA2  *PCREDITDATA2;                     /* pcd */
typedef struct _CREDITDATA2                                     /*  cd */
        {
           MSGHDREBS           mhebs;
           FXFLRKEY            fk;
           FXBOOL              fMsgFirst;
           FXBOOL              fMsgMore;
           FXUSHORT            usItemCnt;
           FXFLRKEY            afkCparty[DIM_MAX_FLR_KEYS_AA];
        }CREDITDATA2;

/*
   NAME :AA_HitProcessed
   DESC :This message announces that a new buy/sell request has been
         successfully matched with an existing quote or quotes and is being
         processed. The receiving Arbitrator should pass this information to
         its Market Distributors.
*/
typedef struct _HITPROCESSED  *PHITPROCESSED;                   /* php */
typedef struct _HITPROCESSED                                    /*  hp */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bHitType;
           EBSTRANSID          etiHitId;
           FXPRICE             prcHit;
           FXPRICE             prcHitDealt;
           FXBASEAMT           baHitAmt;
           FXBASEAMT           baHitAmtAvail;
           FXFLRKEY            fkTaker;
           FXCHAR              achTraderIdTaker [DIM_TRADER_ID];
        }HITPROCESSED;


/*
   NAME :AA_HitProcessed2
   DESC :This message announces that a new buy/sell request has been
         successfully matched with an existing quote or quotes and is being
         processed. The receiving Arbitrator should pass this information to
         its Market Distributors.
*/
typedef struct _HITPROCESSED2  *PHITPROCESSED2;                /* php */
typedef struct _HITPROCESSED2                                  /*  hp */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bHitType;
           EBSTRANSID          etiHitId;
           FXTIMESTAMP         tsHitProcessed;
           FXPRICE             prcHit;
           FXPRICE             prcHitDealt;
           FXPRICE             prcHitDealtBest;
           FXBASEAMT           baHitAmt;
           FXBASEAMT           baHitAmtDealt;
           FXFLRKEY            fkTaker;
           FXCHAR              achTraderIdTaker [DIM_TRADER_ID];
        }HITPROCESSED2;


/*
   NAME :AA_HitQte
   DESC :Sent from the hitting Arbitrator to a remote Arbitrator to notify it
         about a deal initiated on behalf of a taker or another maker.
*/
typedef struct _HITQTE  *PHITQTE;                               /* phq */
typedef struct _HITQTE                                          /*  hq */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId;
           EBSDEALID           ediDealId;
           FXBASEAMT           baDealAmtArb;
           FXFLRKEY            fkTaker;
           FXCHAR              achTraderIdTaker [DIM_TRADER_ID];
           FXDATE              dateValue;
        }HITQTE;


/*
   NAME :AA_HitQte2
   DESC :Sent from the hitting Arbitrator to a remote Arbitrator to notify it
         about a deal initiated on behalf of a taker or another maker.
*/
typedef struct _HITQTE2  *PHITQTE2;                             /* phq */
typedef struct _HITQTE2                                         /*  hq */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId;
           EBSDEALID           ediDealId;
           FXBASEAMT           baDealAmtArb;
           FXFLRKEY            fkTaker;
           FXCHAR              achTraderIdTaker [DIM_TRADER_ID];
           FXDATE              dateValue;
           FXFLRKEY            fkOriginator;
           FXCHAR              achReserved[3];
           IPINFO              ipi;
           FXBITFIELD          bfReserved  : 8;
        }HITQTE2;


/*
   NAME :AA_HitQte3
   DESC :Sent from the hitting Arbitrator to a remote Arbitrator to notify it
         about a deal initiated on behalf of a taker or another maker.
*/
typedef struct _HITQTE3  *PHITQTE3;                             /* phq */
typedef struct _HITQTE3                                         /*  hq */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId;
           EBSDEALID           ediDealId;
           FXBASEAMT           baDealAmtArb;
           FXFLRKEY            fkTaker;
           FXCHAR              achTraderIdTaker [DIM_TRADER_ID];
           FXDATE              dateValue;
           FXFLRKEY            fkPB;
           FXCHAR              achReserved[3];
           IPINFO              ipi;
           FXBITFIELD          bfAutomatch : 1;
           FXBITFIELD          bfReserved  : 7;
        }HITQTE3;


/*
   NAME :AA_HitQte4
   DESC :Sent from the hitting Arbitrator to a remote Arbitrator to notify it
         about a deal initiated on behalf of a taker or another maker.
*/
typedef struct _HITQTE4  *PHITQTE4;                             /* phq */
typedef struct _HITQTE4                                         /*  hq */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId;
           EBSDEALID           ediDealId;
           FXBASEAMT           baDealAmtArb;
           FXFLRKEY            fkTaker;
           FXCHAR              achTraderIdTaker [DIM_TRADER_ID];
           FXDATE              dateValue;
           FXFLRKEY            fkPB;
           FXCHAR              achReserved[3];
           FXBITFIELD          bfAutomatch : 1;
           FXBITFIELD          bfReserved  : 7;
        }HITQTE4;


/*
   NAME :AA_HitQteAck
   DESC :Sent in response to AA_HitQte. If the target quote is not available,
         DealAmtAvail is set to zero.
*/
typedef struct _HITQTEACK  *PHITQTEACK;                         /* phqa */
typedef struct _HITQTEACK                                       /*  hqa */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId; 
           EBSDEALID           ediDealId; 
           FXBASEAMT           baDealAmtAvail;
        }HITQTEACK;



/*
    NAME :AA_LogSessionEnd
    DESC :The last message to be logged in any logging session.
*/
typedef struct _LOGSESSIONEND  *PLOGSESSIONEND;                 /* plse */
typedef struct _LOGSESSIONEND                                   /*  lse */
        {
           MSGHDREBS           mhebs;
        }LOGSESSIONEND;


/*
   NAME :AA_QteDone
   DESC :The Arbitrator logs this message when a local quote record is 
	 being deleted from the Arbitrator database.  The message is used 
	 by the readers of the Log Manager log.
*/
typedef struct _QTEDELETED  *PQTEDELETED;                       /* pqdel */
typedef struct _QTEDELETED                                      /*  qdel */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId;                   

           FXBASEAMT           baQteAmtDone;
           FXBOOL              fQteInterrupted;
        }QTEDELETED;

/*
    NAME :AA_QteAmtReserved
    DESC :This message announces that a specified amount of a quote is no
          longer available because the quote or a part of it has been
          selected to participate in a deal. The receiving Arbitrator should
          reduce the available amount of the quote.
*/
typedef struct _QTEAMTRESERVED  *PQTEAMTRESERVED;               /* pqar */
typedef struct _QTEAMTRESERVED                                  /*  qar */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId; 
           FXBASEAMT           baAmtReserved;
        }QTEAMTRESERVED;


/*
    NAME :AA_QteAmtDone
    DESC :This message announces that the status of a specified amount of 
          a quote, which has been reserved for a pending deal, has been 
          resolved.  It also specifies the part of the reserved amount 
          which was actually dealt and is, therefore, permanently withdrawn 
          from the market.
*/
typedef struct _QTEAMTDONE  *PQTEAMTDONE;                       /* pqad */
typedef struct _QTEAMTDONE                                      /*  qad */
        {       
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId; 
           FXBASEAMT           baAmtReserved;
           FXBASEAMT           baAmtDone;
        }QTEAMTDONE;


/*
    NAME :AA_QteAvailable
    DESC :This message announces the availability of a new quote. The receiving
          Arbitrator should create an entry for the quote in its Active Bids or
          Active Offers lists.
*/
typedef struct _QTEAVAILABLE  *PQTEAVAILABLE;                   /* pqa */
typedef struct _QTEAVAILABLE                                    /*  qa */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId; 
           FXPRICE             prcQte;
           FXBASEAMT           baQteAmt;
           FXBASEAMT           baQteAmtAvail;
           FXFLRKEY            fkMaker;
           FXDATE              dateValue;
           FXCHAR              achTraderIdMaker[DIM_TRADER_ID];
        }QTEAVAILABLE;


/*
    NAME :AA_QteAvailable2
    DESC :This message announces the availability of a new quote. The receiving
          Arbitrator should create an entry for the quote in its Active Bids or
          Active Offers lists.  For use with Linked Amounts, or later versions.
*/
typedef struct _QTEAVAILABLE2  *PQTEAVAILABLE2;                   /* pqa */
typedef struct _QTEAVAILABLE2                                     /*  qa */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId; 
           FXPRICE             prcQte;
           FXBASEAMT           baQteAmt;
	   FXBASEAMT	       baLinkedAmt;
           FXBASEAMT           baQteAmtAvail;
	   FXBASEAMT	       baLinkedAmtAvail;
           FXFLRKEY            fkMaker;
           FXDATE              dateValue;
           FXCHAR              achTraderIdMaker[DIM_TRADER_ID];
        }QTEAVAILABLE2;



/*
    NAME :AA_QteAvailable3
    DESC :This message announces the availability of a new quote. The receiving
          Arbitrator should create an entry for the quote in its Active Bids or
          Active Offers lists.  For use with PB 2.1, or later versions.
*/
typedef struct _QTEAVAILABLE3  *PQTEAVAILABLE3;                   /* pqa */
typedef struct _QTEAVAILABLE3                                     /*  qa */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId; 
           FXPRICE             prcQte;
           FXBASEAMT           baQteAmt;
	   FXBASEAMT	       baLinkedAmt;
           FXBASEAMT           baQteAmtAvail;
	   FXBASEAMT	       baLinkedAmtAvail;
           FXFLRKEY            fkMaker;
           FXDATE              dateValue;
           FXCHAR              achTraderIdMaker[DIM_TRADER_ID];
           FXFLRKEY            fkOriginator;
           EBSPBID             epbiMakerPB;
        }QTEAVAILABLE3;



/*
    NAME :AA_QteData
    DESC :This message contains a full representation of the owning
          Arbitrator's set of local quotes for the specified currency pair.
          It is used to (re)initialize the corresponding data held by the
          remote Arbitrator.

        NOTE: this message has been superseded by QTEDATA2, but remains
              for compatibility with old log files that contain it
*/
typedef struct _QTEDATA  *PQTEDATA;                             /* pqd */
typedef struct _QTEDATA                                         /*  qd */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           FXBOOL              fMsgFirst;
           FXBOOL              fMsgMore;
           FXBYTE	       bItemCnt;
           QTEINFO             aqifQteInfo[DIM_QTE_INFO];
        }QTEDATA;


/*
    NAME :AA_QteData2
    DESC :This message contains a full representation of the owning
          Arbitrator's set of local quotes for the specified currency pair.
          It is used to (re)initialize the corresponding data held by the
          remote Arbitrator.
*/
typedef struct _QTEDATA2  *PQTEDATA2;                           /* pqd */
typedef struct _QTEDATA2                                        /*  qd */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           FXBOOL              fMsgFirst;
           FXBOOL              fMsgMore;
           FXBYTE	       bItemCnt;
           QTEINFO2            aqifQteInfo[DIM_QTE_INFO];
        }QTEDATA2;


/*
    NAME :AA_QteData3
    DESC :This message contains a full representation of the owning
          Arbitrator's set of local quotes for the specified currency pair.
          It is used to (re)initialize the corresponding data held by the
          remote Arbitrator.
*/
typedef struct _QTEDATA3  *PQTEDATA3;                           /* pqd */
typedef struct _QTEDATA3                                        /*  qd */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           FXBOOL              fMsgFirst;
           FXBOOL              fMsgMore;
           FXBYTE	       bItemCnt;
           QTEINFO3            aqifQteInfo[DIM_QTE_INFO];
        }QTEDATA3;


/*
    NAME :AA_QteData4
    DESC :This message contains a full representation of the owning
          Arbitrator's set of local quotes for the specified currency pair.
          It is used to (re)initialize the corresponding data held by the
          remote Arbitrator.
*/
typedef struct _QTEDATA4  *PQTEDATA4;                           /* pqd */
typedef struct _QTEDATA4                                        /*  qd */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           FXBOOL              fMsgFirst;
           FXBOOL              fMsgMore;
           FXBYTE	       bItemCnt;
           QTEINFO4            aqifQteInfo[DIM_QTE_INFO];
        }QTEDATA4;


/*
    NAME :AA_QteDataLog
    DESC :This message contains a full representation of the owning
          Arbitrator's quote.  It is used to provide single quotes 
	  extracted from AA_QteData for the Log Manager.

        NOTE: this message has been superseded by QTEDATALOG2, but remains
              for compatibility with old log files that contain it
*/
typedef struct _QTEDATALOG  *PQTEDATALOG;			/* pqdl */
typedef struct _QTEDATALOG                                      /*  qdl */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           QTEINFO             qifQteInfoLog;
        }QTEDATALOG;           


/*
    NAME :AA_QteDataLog2
    DESC :This message contains a full representation of the owning
          Arbitrator's quote.  It is used to provide single quotes 
          extracted from AA_QteData2 for the Log Manager.
*/
typedef struct _QTEDATALOG2 *PQTEDATALOG2;			/* pqdl */
typedef struct _QTEDATALOG2                                     /*  qdl */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           QTEINFO2            qifQteInfoLog;
        }QTEDATALOG2;           


/*
    NAME :AA_QteDataLog3
    DESC :This message contains a full representation of the owning
          Arbitrator's quote.  It is used to provide single quotes 
          extracted from AA_QteData2 for the Log Manager.
*/
typedef struct _QTEDATALOG3 *PQTEDATALOG3;			/* pqdl */
typedef struct _QTEDATALOG3                                     /*  qdl */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           QTEINFO3            qifQteInfoLog;
        }QTEDATALOG3;           


/*
    NAME :AA_QteDataLog4
    DESC :This message contains a full representation of the owning
          Arbitrator's quote.  It is used to provide single quotes 
          extracted from AA_QteData2 for the Log Manager.
*/
typedef struct _QTEDATALOG4 *PQTEDATALOG4;			/* pqdl */
typedef struct _QTEDATALOG4                                     /*  qdl */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           QTEINFO4            qifQteInfoLog;
        }QTEDATALOG4;           


/*
   NAME :AA_StartupArbRqst
   DESC :Sent during startup by an Arbitrator signing on to another Arbitrator.
*/
typedef struct _STARTUPARBRQST  *PSTARTUPARBRQST;               /* psar */
typedef struct _STARTUPARBRQST                                  /*  sar */
        {
           MSGHDREBS           mhebs;
           FXTIMESTAMP         tsPairsFile;
           FXTIMESTAMP         tsNodesFile;
        }STARTUPARBRQST;


/*
   NAME :AA_StartupArbRqst2
   DESC :Sent during startup by an Arbitrator signing on to another Arbitrator.
*/
typedef struct _STARTUPARBRQST2  *PSTARTUPARBRQST2;             /* psar */
typedef struct _STARTUPARBRQST2                                 /*  sar */
        {
           MSGHDREBS           mhebs;
           FXTIMESTAMP         tsPairsFile;
           FXTIMESTAMP         tsNodesFile;
           FXTIMESTAMP         tsGlobalFile;
        }STARTUPARBRQST2;


/*
    NAME :AA_StartupArbAck
    DESC :Sent in response to AA_StartupArbRqst.
*/
typedef struct _STARTUPARBACK  *PSTARTUPARBACK;                 /* psaa */
typedef struct _STARTUPARBACK                                   /*  saa */
        {
           MSGHDREBS           mhebs;
           FXBYTE              bStartupStatus;
        }STARTUPARBACK;


/*
    NAME :AA_QteNotTaker
    DESC :Sent by an Arbitrator when it detects that it owns an offer that is
          too old to be a taker, and a matching remote bid exists; the receiving
          Arbitrator knows that it will be able to initiate a deal with the
          offer at any time that it learns that a portion of it has become
          available.
*/
typedef struct _QTENOTTAKER  *PQTENOTTAKER;                     /* pqnt */
typedef struct _QTENOTTAKER                                     /*  qnt */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId; 
        } QTENOTTAKER;



/*
    NAME :AA_LostCompConn
    DESC :This message is logged by an Arbitrator when it loses a connection
          with a bank or another Arbitrator.  The message is only logged, it
          is NOT sent to other Arbitrators.
          NOTE: both the NETLADDR and the node name are provided to allow for
                situations where an old log is being examined and the address
                of the node has since changed.
*/
typedef struct _LOSTCOMPCONN *PLOSTCOMPCONN;                    /* plcc */
typedef struct _LOSTCOMPCONN                                    /*  lcc */
        {
           MSGHDREBS           mhebs;
           NETLADDR            netlLost;
           FXCHAR              achNodeNameLost[DIM_NODE_NAME_LEN];
           FXFLRKEY            fkLost;		/* applicable only if netlLost
						   identifies a bank */
        } LOSTCOMPCONN;



/*
    NAME :AA_QteAmtHide
    DESC :This message is logged by an Arbitrator when it "hides" a quote's
          available amount in situations where a quote has initiated an amount
          of deals equal to Max Pending Deals and more matching quotes are
          available.

          NOTE: This message is only logged; it is NOT sent to any component.
*/
typedef struct _QTEAMTHIDE *PQTEAMTHIDE;                        /* pqah */
typedef struct _QTEAMTHIDE                                      /*  qah */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId; 
           FXBASEAMT           baQteAmtHide;
        } QTEAMTHIDE;



/*
    NAME :AA_QteAmtShow
    DESC :This message is logged by an Arbitrator when it "shows" a quote's
          hidden amount after hiding it.  The amount is available for matching
          and is reflected in a corresponding QteAmtDone or deal initiation
          message.

          NOTE: This message is only logged; it is NOT sent to any component.
*/
typedef struct _QTEAMTSHOW *PQTEAMTSHOW;                        /* pqas */
typedef struct _QTEAMTSHOW                                      /*  qas */
        {
           MSGHDREBS           mhebs;
           CCYKEYPAIR          ckpCcyPair;
           FXBYTE              bQteType;
           EBSTRANSID          etiQteId; 
           FXBASEAMT           baQteAmtShow;
        } QTEAMTSHOW;



/*
   NAME :AA_MANOnlineData
   DESC :This message contains a representation of the status of a number of
         floors (MANs) that are currently signed on to the sending Arbitrator.
         The message is used to (re)initialize the corresponding data held by
         the remote Arbitrator.
*/
typedef struct _MANONLINEDATA *PMANONLINEDATA;                  /* pmod */
typedef struct _MANONLINEDATA                                   /*  mod */
        {
          MSGHDREBS     mhebs;
          FXBITFIELD    bfMsgFirst      : 1;
          FXBITFIELD    bfMsgMore       : 1;
          FXBITFIELD    bfReserved      : 6;
          FXBYTE        bItemCnt;
          MANINFO       amif[DIM_MAX_MAN_INFO];
        }MANONLINEDATA;


typedef struct _MANONLINEDATA2 *PMANONLINEDATA2;                /* pmod */
typedef struct _MANONLINEDATA2                                  /*  mod */
        {
          MSGHDREBS     mhebs;
          FXBITFIELD    bfMsgFirst      : 1;
          FXBITFIELD    bfMsgMore       : 1;
          FXBITFIELD    bfReserved      : 6;
          FXBYTE        bItemCnt;
          MANINFO2      amif[DIM_MAX_MAN_INFO];
        }MANONLINEDATA2;


/*
   NAME :AA_MANOnlineUpdate
   DESC :This message contains a representation of the status of a floor
         (MAN) that is currently signed on to the sending Arbitrator.
         The message is used to update the corresponding data held by the
         the remote Arbitrator.
*/
typedef struct _MANONLINEUPDATE *PMANONLINEUPDATE;              /* pmou */
typedef struct _MANONLINEUPDATE                                 /*  mou */
        {
          MSGHDREBS     mhebs;
          MANINFO       mif;
        }MANONLINEUPDATE;


typedef struct _MANONLINEUPDATE2 *PMANONLINEUPDATE2;            /* pmou */
typedef struct _MANONLINEUPDATE2                                /*  mou */
        {
          MSGHDREBS     mhebs;
          MANINFO2      mif;
        }MANONLINEUPDATE2;


/*
   NAME :AA_MANOffline
   DESC :This message informs a remote Arbitrator that a floor (MAN) has
         signed off.  The remote Arbitrator clears the corresponding data.
*/
typedef struct _MANOFFLINE *PMANOFFLINE;                        /* pmoff */
typedef struct _MANOFFLINE                                      /*  moff */
        {
          MSGHDREBS     mhebs;
          FXFLRKEY      fk;
        }MANOFFLINE;


#endif
